<?php
$cid        = gpc_getStringArray('cid');
$name       = "";

if(count($cid)==0)
{
    $cid[0]=$id;
}

foreach($cid as $id)
{
    //lay thong tin cua news can xoa:
    $sql_select="select cName from tbladvertise where iAdvertiseId ='$id'";
    $rs=$dbsql->query($sql_select);
    if($result=$dbsql->fetch_array($rs))
    {
    	$name.=$result['cName'].", ";
    }


    //--------------Xoa news da duoc chi dinh
    $sql_delete = "DELETE FROM tbladvertise WHERE iAdvertiseId = '$id'";
    $dbsql->query($sql_delete);
}

page_transfer("Delete Advertise success ",$pagetr);
die();
?>